solving equations between quadratic and linear functions